<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>nihao</title>
</head>

<body>
	<?php 
		
		if (isset($_POST['submit'])){
			$files_name=$_FILES['upfiles']['name'];
			$files_type=$_FILES['upfiles']['type'];
			$files_size=$_FILES['upfiles']['size'];
			if ($_FILES['upfiles']['error']==0){
				echo '11';
				$target='images2/'.$files_name;
				echo $target;
				if (move_uploaded_file($_FILES['upfiles']['tmp_name'],$target)){
					echo 'files is updates!<br/>';
					echo $files_size.'<br/>';
					echo $files_type.'<br/>';
				}
			}
			
		}
	?>
	
	<form enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    	<input type="file" name="upfiles" id="upfiles" />
        <input type="submit" name="submit" id="submit" value="submit" />
    </form>
</body>
</html>